package com.droid.faces;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.droid.persistor.dao.Gasto;
import com.droid.persistor.facade.PersistorFacade;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class User implements Serializable {
	private String username;
	private String password;

	public User(String username, String password) {
		this.username = username;
		this.password = password;
	}

	public String getUsername(){
		return this.username;
	}
	
	public ArrayList<Gasto> getUsuarioGastosDB() {

		PersistorFacade pFacade= new PersistorFacade();
		ArrayList<Gasto> resp=pFacade.obtenerUsuarioGastos(this.username);

		return resp;
		
	}	

}